import { createRouter, createWebHistory } from "vue-router"
import FirstView from '../views/FirstView.vue'
import SecondView from '../views/SecondView.vue'
import ThirdView from '../views/ThirdView.vue'
import UserSettings from '../views/UserSettingsView.vue'
import UserSettingsEmail from '../views/UserSettingsEmailView.vue'
import UserSettingsProfile from '../views/UserSettingsProfileView.vue'
import UserSettingsProfileHelper from '../views/UserSettingsProfileHelperView.vue'


const router = createRouter({
    history: createWebHistory(),
    routes: [
        {
            path: '/',
            components: {
                a: FirstView,
                b: SecondView,
                c: ThirdView
            }
        },
        { 
            path: '/two',
            components: {
                a: SecondView,
                b: FirstView,
                c: ThirdView
            }
        },
        {
            path: '/three',
            components: {
                a: ThirdView,
                b: SecondView,
                c: FirstView
            }
        },
        {
            path: '/us',
            components: {
                a: ThirdView,
                b: SecondView,
                c: FirstView,
                us: UserSettings
            },
            children: [
                {
                    path: 'email',
                    component: UserSettingsEmail
                },
                {
                    path: 'profile',
                    components: {
                        default: UserSettingsProfile,
                        helper: UserSettingsProfileHelper
                    }
                }
            ]
        }
    ]
})

export default router